<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basepath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>场内出租商铺管理</title>
    <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport" />
    <meta content="black" name="apple-mobile-web-app-status-bar-style" />
    <meta content="telephone=no" name="format-detection" />
    <link href="<%=basepath%>css/index.css" rel="stylesheet" type="text/css">
    <link href="<%=basepath%>css/index-1.css" rel="stylesheet" type="text/css">
    <script src="<%=basepath%>js/jquery-1.8.3.min.js"></script>
    <script src="<%=basepath%>js/layer/layer.js"></script>
    <script src="<%=basepath%>js/TouchSlide.1.1.js"></script>
</head>
<body>
<%
String code = request.getParameter("code");
String state =request.getParameter("state");
%>
<div class="viewport">
    <div class="header">
       <div class="header-1">
           <a href="javascrpt:void(0)" id="join" class="header-2">
              <span id="account" class="account">${empty user.realName ? '' : user.realName}</span>&nbsp;&nbsp;<span id="deptName" class="deptName">${user.departmentName}</span>
           </a>
           <a href="/wape-web/api/core/centerService?serviceCode=WJ9999&targetURL=store&prefix=3g_platform_shop-rent_op&entrance=yes" class="back" id="back">返回</a>
           <span class="span-num main">WOP30000</span>
       </div>
    </div>
    <script type="text/javascript">$("#back").hide();</script>
    <div class="content m-top">
            <div class="blank-2"></div>
            <div class="content-3-1">
                <a class="content-3-1-1 ctp-3-1-1" href="javascript:void(0)">
                    <span class="span-1">档口信息维护</span>
                </a>

            </div>
            <div class="content-3-2">
                <ul>
                    <li class="li-1"><a href="/wape-web/api/core/centerService?serviceCode=MMZS21108"><img src="<%=basepath%>images/Market_division.png"><br/><span>市场分区</span> </a> </li>
                    <li><a href="/wape-web/api/core/centerService?serviceCode=MMZS21201&fatherType=10"><img src="<%=basepath%>images/shops_scattered.png"><br/><span>档口分布</span> </a> </li>
                    <li></li>
                    <li></li>
                    <li class="li-5"></li>
                </ul>
            </div>
            <div class="blank-2"></div>
            <div class="content-3-1">
                <a class="content-3-1-1 ctp-3-1-1" href="javascript:void(0)">
                    <span class="span-1">出租/出售合同管理（协议）</span>
                </a>

            </div>
            <div class="content-3-2">
                <ul>
                    <li class="li-1"><a href="/wape-web/api/core/centerService?serviceCode=MMZS21211&fatherType=10&openId=${openId}&isWX=${isWX}"><img src="<%=basepath%>images/Shop_navigation1.png"><br/><span>商铺导航</span> </a> </li>
                    <li><a href="/wape-web/api/core/centerService?serviceCode=MMZS24104&openId=${openId}&isWX=${isWX}"><img src="<%=basepath%>images/contract_management.png"><br/><span>合同管理</span> </a> </li>
                    <li><a href="/wape-web/api/core/centerService?serviceCode=MMZS24106&openId=${openId}&isWX=${isWX}"><img src="<%=basepath%>images/Deposit_collection9.png"><br/><span>定金收费</span> </a> </li>
                    <li><a href="javascript:void(0)"><img src="<%=basepath%>images/history_record.png"><br/><span>历史记录</span> </a> </li>
                    <li class="li-5"><a href="javascript:void(0)"><img src="<%=basepath%>images/contract_inquiry.png"><br/><span>合同查询</span> </a> </li>
                </ul>
            </div>
            <div class="blank-2"></div>
            <div class="content-3-1">
                <a class="content-3-1-1 ctp-3-1-1" href="javascript:void(0)">
                    <span class="span-1">租金管理</span>
                </a>

            </div>
            <div class="content-3-2">
                <ul>
                    <li class="li-1"><a href="/wape-web/api/core/centerService?serviceCode=MMZS21212&fatherType=10&openId=${openId}&isWX=${isWX}"><img src="<%=basepath%>images/Shop_navigation2.png"><br/><span>商铺导航</span> </a> </li>
                    <li><a href="/wape-web/api/core/centerService?serviceCode=WJ9999&targetURL=rent-collect&prefix=3g_platform_shop-rent_yp&openId=${openId}&isWX=${isWX}"><img src="<%=basepath%>images/Rent_collection.png"><br/><span>租金收缴</span> </a> </li>
                    <li><a href="javascript:void(0)"><img src="<%=basepath%>images/Monthly_report1.png"><br/><span>当月报表</span> </a> </li>
                    <li></li>
                    <li class="li-5"></li>
                </ul>
            </div>
            <div class="blank-2"></div>
            <div class="content-3-1">
                <a class="content-3-1-1 ctp-3-1-1" href="javascript:void(0)">
                    <span class="span-1">物业管理费</span>
                </a>

            </div>
            <div class="content-3-2">
                <ul>
                    <li class="li-1"><a href="javascript:void(0)"><img src="<%=basepath%>images/Shop_navigation3.png"><br/><span>商铺导航</span> </a> </li>
                    <li><a href="javascript:void(0)"><img src="<%=basepath%>images/property_fee_collection.png"><br/><span>物业费收缴</span> </a> </li>
                    <li><a href="javascript:void(0)"><img src="<%=basepath%>images/Monthly_report2.png"><br/><span>当月报表</span> </a> </li>
                    <li></li>
                    <li class="li-5"></li>
                </ul>
            </div>
            <div class="blank-2"></div>
            <div class="content-3-1">
                <a class="content-3-1-1 ctp-3-1-1" href="javascript:void(0)">
                    <span class="span-1">水电费</span>
                </a>

            </div>
            <div class="content-3-2">
                <ul>
                    <li class="li-1"><a href="javascript:void(0)"><img src="<%=basepath%>images/Shop_navigation4.png"><br/><span>商铺导航</span> </a> </li>
                    <li><a href="javascript:void(0)"><img src="<%=basepath%>images/water_and_electricity.png"><br/><span>水电费收缴</span> </a> </li>
                    <li><a href="javascript:void(0)"><img src="<%=basepath%>images/meter_reading_record.png"><br/><span>抄表记录</span> </a> </li>
                    <li><a href="javascript:void(0)"><img src="<%=basepath%>images/Monthly_report3.png"><br/><span>当月报表</span> </a> </li>
                    <li class="li-5"></li>
                </ul>
            </div>
        </div>
        <div class="space"></div>
    </div>
</div>
</body>
<script type="text/javascript">
    /*错误提示*/
    $(function(){
        var error = "${requestScope.returnMsg}";
        if(error != "" && error != "成功!"){
            layer.msg(error,{shadeClose:true,shade:0.1,time:2000});
        }
    });
    /*识别浏览器*/
    $(function(){
        var ua = window.navigator.userAgent.toLowerCase();
        if(ua.match(/MicroMessenger/i) == 'micromessenger'){
            /*微信自动登录 */
            layer.load();
            $.ajax({
                url:"/wape-web/api/core/centerService",
                dataType:"json",
                data:{
                    serviceCode:"1001W01",
                    code:"<%=code %>"
                },
                complete:function(xhr,status){
                	var openId = xhr.responseText.replace(/(\n)+|(\r\n)+/g, "");
                    //alert(openId);
                	if(openId == "null" || openId == ""){
                        layer.closeAll();
                        window.location.href="/wape-web/api/core/centerService?serviceCode=WJ9999&targetURL=store&prefix=3g_platform_shop-rent_op&entrance=yes";
                    }
                    else{
                    	$.ajax({
                            type:"post",
                            url:"/wape-web/api/core/centerService",
                            data:{
                                serviceCode:"1001W02",
                                sign: 'web',
                                timestamp: 'web',
                                nonce: 'web',
                                editUser: 'web',
                                editTime: 'web',
                                device: 'web',
                                ipaddr: 'web',
                                mac: 'web',
                                openId:openId
                            },
                            success:function(data){
                                var wechat = eval("("+data+")");
                                if(wechat.returnCode == "200"){
                                    layer.closeAll();
                                    if(wechat.result.realName != ""){
                                        $("#account").text(wechat.result.realName);
                                    }
                                    else if(wechat.result.realName == ""){
                                        $("#account").text("您还未登录哦！");
                                    }
                                    $("#compNickName").text(wechat.result.companyNickName);
                                    $("#deptName").text(wechat.result.departmentName);
                                }
                                else{
                                    layer.closeAll();
                                    $("#account").text("您还未登录哦！");
                                    layer.msg("您未绑定农商号，请登录绑定！",{shadeClose:true,shade:0.1,time:2000});
                                }
                            }
                        })
                    }
                }
            });
        }
        else{}
    });
    
</script>
</html>


